package com.bytezero.controller;

import com.bytezero.bean.Emp;
import com.bytezero.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Bytezero_zhengLei
 * @Date: 2024/6/30 20:16
 * @Project_Name:
 * @Email: 420498246@qq.com
 * @Description:
 * @TODO:
 */

@RestController
public class EmpController {

    @Autowired
    EmpService empService;

    @RequestMapping("/updateEmp")
    public String updateEmp(Emp emp) {
        empService.updateEmp(emp);
//        System.out.println(emp);
        return "ok";
    }

    @RequestMapping("/deleteEmps")
    public String deleteEmps(@RequestParam List<Integer> ids) {
        empService.deleteEmps(ids);

        return "ok";
    }


}
